<!--
OpenCart Extension
Project Name: News Extension
Author: Rio Yudistira Eryanza a.k.a superbrands
Email (PayPal Account): rio.yudistira@yahoo.com
License: Commercial
-->
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
  	   <?php if($date_modified != $date_added){ ?>
      <span class="news-properties" style="font-size: 11px; color: #aaaaaa;"><b><?php echo $text_updated_on; ?></b> <?php echo $date_modified; ?> | <b><?php echo $text_posted_on; ?></b> <?php echo $date_added; ?> | <?php echo $text_read; ?> <b><?php echo $count_read; ?></b> <?php echo $text_times; ?> | <b><?php echo $comment_total; ?></b> <?php echo $text_comments; ?></span><br /><br />
      <?php }else{ ?>
      <span class="news-properties" style="font-size: 11px; color: #aaaaaa;"><b><?php echo $text_posted_on; ?></b> <?php echo $date_added; ?> | <?php echo $text_read; ?> <b><?php echo $count_read; ?></b> <?php echo $text_times; ?> | 0 Comments</span><br /><br />
      <?php } ?>
  		<div style="text-align: justify;"><?php echo $description; ?></div>
  		<br />
  		<?php if ($related_newss) { ?>
  		<div class="heading" style="text-transform: capitalize;"><?php echo $text_related_news; ?></div>
  		<ul style="margin-top: 0px;">
  			<?php foreach ($related_newss as $related_news) { ?>
  			<li><a href="<?php echo $related_news['href']; ?>"><?php echo $related_news['title']; ?></a></li>
  			<?php } ?>
  		</ul>
  		<?php } ?>
  		<!-- Comment Area start -->
  		<?php if($allow_comment){ ?>
  		<?php if($comment_permission == 'member_only'){ ?>
  		<?php if ($logged) { ?>
  		<a name="comment_area"></a>  		
  		<div style="height: 4px; border-bottom: 1px dashed #cccccc;"></div>
  		<div class="heading" id="comment_title"><?php echo $text_comment; ?></div>
  		<?php if ($comments) { ?>
		<?php foreach ($comments as $comment) { ?>
		<div class="content"><b><?php echo $comment['name']; ?></b> | <?php echo $comment['date_added']; ?><br />
  		<br />
  		<?php echo $comment['comment']; ?></div>
		<?php } ?>
		<div class="pagination"><?php echo $pagination; ?></div>
		<?php } else { ?>
		<div class="content"><?php echo $text_no_comment; ?></div>
		<?php } ?>		
		<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="comment"><a name="comment_form"></a>
  		<div id="comment">
  		<?php if(!empty($error_messages)){ ?><div class="error" style="text-align: center; border: 1px solid Red; background-color: pink; padding: 4px;"><?php echo $error_messages; ?></div><?php } ?>
     <?php if(!empty($success_messages)){ ?><div class="success" style="text-align: center; border: 1px solid Green; background-color: #dbe8db; padding: 4px;"><?php echo $success_messages; ?></div><?php } ?>
      </div>
      <div class="heading" id="comment_title"><?php echo $text_write_comment; ?></div>
      <div class="content"><b><?php echo $entry_name; ?></b><br />
        <input type="text" name="name" value="" />
        <br />
        <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_email; ?></b><br />
        <input type="text" name="email" value="" />
        <br />
        <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_comment; ?></b>
        <textarea name="comment" style="width: 98%;" rows="4"></textarea>
        <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
        <?php if ($error_comment) { ?>
            <span class="error"><?php echo $error_comment; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
        <br />
        <img src="index.php?route=news/news/captcha" id="captcha" />
        <?php if ($error_captcha) { ?>
            <br /><span class="error"><?php echo $error_captcha; ?></span><br />
        <?php } ?>
      </div>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#comment').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      </form>
      <?php }else{ ?>
      <a name="comment_area"></a>  		
  		<div style="height: 4px; border-bottom: 1px dashed #cccccc;"></div>
  		<div class="heading" id="comment_title"><?php echo $text_comment; ?></div>
  		<div class="content"><?php echo $text_comment_must_logged; ?></div>
      <?php } ?>
      <?php }else{ ?>
      <a name="comment_area"></a>  		
  		<div style="height: 4px; border-bottom: 1px dashed #cccccc;"></div>
  		<div class="heading" id="comment_title"><?php echo $text_comment; ?></div>
  		<?php if ($comments) { ?>
		<?php foreach ($comments as $comment) { ?>
		<div class="content"><b><?php echo $comment['name']; ?></b> | <?php echo $comment['date_added']; ?><br />
  		<br />
  		<?php echo $comment['comment']; ?></div>
		<?php } ?>
		<div class="pagination"><?php echo $pagination; ?></div>
		<?php } else { ?>
		<div class="content"><?php echo $text_no_comment; ?></div>
		<?php } ?>		
		<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="comment"><a name="comment_form"></a>
  		<div id="comment">
  		<?php if(!empty($error_messages)){ ?><div class="error" style="text-align: center; border: 1px solid Red; background-color: pink; padding: 4px;"><?php echo $error_messages; ?></div><?php } ?>
     <?php if(!empty($success_messages)){ ?><div class="success" style="text-align: center; border: 1px solid Green; background-color: #dbe8db; padding: 4px;"><?php echo $success_messages; ?></div><?php } ?>
      </div>
      <div class="heading" id="comment_title"><?php echo $text_write_comment; ?></div>
      <div class="content"><b><?php echo $entry_name; ?></b><br />
        <input type="text" name="name" value="" />
        <br />
        <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_email; ?></b><br />
        <input type="text" name="email" value="" />
        <br />
        <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_comment; ?></b>
        <textarea name="comment" style="width: 98%;" rows="4"></textarea>
        <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
        <?php if ($error_comment) { ?>
            <span class="error"><?php echo $error_comment; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
        <br />
        <img src="index.php?route=news/news/captcha" id="captcha" />
        <?php if ($error_captcha) { ?>
            <br /><span class="error"><?php echo $error_captcha; ?></span><br />
        <?php } ?>
      </div>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#comment').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      </form>
      <?php } ?>
      <?php } ?>
      <!-- Comment Area end -->
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<?php echo $footer; ?> 